import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'login',
      component: ()=>import('../view/Login')
    },
    {
      path: '/hello',
      name:'hello',
      component: ()=>import('../components/hello')
    },

    {
      path: '/main',
      name: 'main',
      component: ()=>import('../view/Main'),
      children:[
        {
          path: '/main/homepage',
          name: 'homepage',
          component: ()=>import('../view/User/Home')
        },
        {
          path: '/main/PersonInfo',
          name: 'PersonInfo',
          component: ()=>import('../view/User/PersonInfo')
        },

        {
          path: '/main/InfoManage',
          name: 'InfoManage',
          component: ()=>import('../view/User/InfoManage')
        },

        {
          path: '/provider/ProviderInfo',
          name: 'ProviderInfo',
          component: ()=>import('../view/Provider/ProviderInfo')
        },
        {
          path: '/medicine/MedicineInfo',
          name: 'MedicineInfo',
          component: ()=>import('../view/Medicine/MedicineInfo')
        },
        {
          path: '/medicine/MedicineBuy',
          name: 'MedicineBuy',
          component: ()=>import('../view/Buy/Buy')
        },
        {
          path: '/medicine/OrderInfo',
          name: 'OrderInfo',
          component: ()=>import('../view/Order/Order')
        },
        {
          path: '/main/notices',
          name: 'notices',
          component: ()=>import('../view/User/notice')
        },


      ]

    },
    {
      path: '/register',
      name:'register',
      component: ()=>import('../view/Register')
    }

  ]
})
